export {}

// 只读属性初始化后，不能再修改
class Person {
  name: string;
  private age: number = 27;
  protected readonly gender: boolean;

  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
    this.gender = true;
  }

  sayHi (msg: string): string {
    return `I am ${this.name}, ${this.age}`;
  }
}